import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    keyword: ''
  },
  getters: {
  },
  mutations: {
    // 保存搜索关键字
    saveKey (state, keyword) {
      state.keyword = keyword
    },
    // 清空搜索关键字
    removeKey (state) {
      state.keyword = ''
    }
  },
  actions: {
  },
  modules: {
  }
})
